package com.mtnz.njk;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableScheduling // 开启定时任务
@EnableTransactionManagement // 开启事务支持
// @EnableEurekaServer

// @EnableDiscoveryClient //启用服务注册与发现
// @EnableFeignClients //启用Feign客户端
@EnableCaching // 开启缓存
public class AppManager extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(AppManager.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(AppManager.class);
    }

  /*  @Bean
    @LoadBalanced//对restTemplate进行负载均衡
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }*/


}
